@extends('home.layout.base')
@section('title', '购物车列表页')
@section('pluginstyle')
<script src="{{ asset('/dist/home/js/1102.js') }}"></script>
<link rel="stylesheet" href="{{ asset('/dist/home/css/search.css') }}" />
<link rel="stylesheet" href="{{ asset('/dist/home/css/v3203b5.css') }}">
<link rel="stylesheet" href="{{ asset('/dist/home/css/qiku.css') }}">
<link rel="stylesheet" href="{{ asset('/dist/home/css/store.css') }}">
<link rel="stylesheet" href="{{ asset('/dist/home/css/qikoo_user.css') }}">
<script>var _isindex = 0;</script>
<style>
    .wrap_row{border-bottom:1px dashed #eee}.icon_zp{background-color:#F95E38;color:#fff}.icon_zp,.icon_zp_no{border-radius:2px;display:inline-block;padding:2px 5px}.icon_zp_no{background-color:#ededed;color:#333}.zp_title{margin:6px 0 2px}.zp_chose{color:#c00;cursor:pointer}.zp_info{line-height:16px;overflow:hidden;padding-left:15px;text-align:left}.row_list{background-color:#F5F5F5}.wrap_zp{margin-bottom:15px;margin-top:-15px;position:relative}.zp_sanjiao{border:15px solid #fff;border-bottom:15px solid #F5F5F5;height:0;left:67px;position:absolute;width:0}.zp_space{height:30px}.dn{display:none}.wrap_row:last-child{border-bottom:0}.row_list .r3{font-size:16px}.cartList .bd .row{border-bottom:0}
</style>
@endsection
@section('content')
<div class="gCart">
    <div class="hd">
        <h3>我的购物车</h3>
    </div>
    <div class="bd">
        <div class="cartList">
            <div class="hd">
                <div class="col1">
                    商品信息
                </div>
                <div class="col2">
                    单价
                </div>
                <div class="col3">
                    数量
                </div>
                <div class="col4">
                    小计
                </div>
                <div class="col5">
                    操作
                </div>
            </div>
            <div class="bd">
                <div class="wrap_row">
                    <div class="row">
                        <?php $sum = 0 ?>
                        @foreach ($data as $tmp)
                        <?php $sum += $tmp->cart_price * $tmp->cart_num ?>
                        <div class="r1">
                            <img class="item-img" src="{{$tmp->cart_img}}"><a class="item-namexx" href="#" target="_blank"> {{$tmp->goods_name}}  </a>
                        </div>
                        <div class="r2">
                            <span class="goodsPrice">{{$tmp->cart_price}}</span>元
                        </div>
                        <div class="r3">
                            <div class="gcIpt" data-monitor="shopcart_number_click">
                                <a href="#" class="decrement" data-id="{{$tmp->id}}"></a>
                                <input type="text" class="goodsCount" data-id="{{$tmp->id}}" value="{{$tmp->cart_num}}">
                                <a href="#" class="increment" data-id="{{$tmp->id}}"></a>
                            </div>
                            <div class="errTip">
                                已达到最大购买数量
                            </div>
                        </div>
                        <div class="r4">
                            <span class="pc">{{$tmp->cart_price*$tmp->cart_num}}</span>元
                        </div>
                        <div class="r5">
                            <a href="{{url("/shopcar/delete", [$tmp->id])}}" class="delOrder" item_id="5708abac5efb1174378b457f">删除</a>
                        </div>
                        @endforeach                                   
                    </div>
                </div>
            </div>
            <div class="gAmount">
                (商品总计)：<span class="total">{{$sum}}</span>元
            </div>
            <div class="btn">
                <a href="{{ url("/list") }}" class="b1" title="继续购物">继续购物</a>
                <a href="{{ url('/order') }}" class="b2" title="去结算">去结算</a>
            </div>
        </div>
    </div>
</div>
@endsection
@section('pluginscript')
<script src="{{ asset('/js/shopcar.js') }}"></script>
@endsection
